package com.power.sifa.approve.api;

import com.plf.common.domain.ResponseDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import com.power.sifa.approve.model.Apl_agent;
import com.power.sifa.approve.model.pageInfo.Apl_agentPageInfo;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 *  委托代理人 Feign
 */
public interface IApl_agentFeign {

    /**
     * 委托代理人分页列表
     */
    @PostMapping("/apl_agent/list")
    ResponseDTO list(@RequestBody Apl_agentPageInfo apl_agentPageInfo);

    /**
    * 查看委托代理人
    */
    @GetMapping("/apl_agent/view")
    ResponseDTO view(@RequestParam("id") String id);

    /**
    * 删除委托代理人
    */
    @PostMapping("/apl_agent/delete")
    ResponseDTO delete(@RequestParam("id") String id);

    ///**
    // * 查看委托代理人 复合主键使用
    // */
    //@PostMapping("/apl_agent/viewByPK")
    //ResponseDTO viewByPK(@RequestBody Apl_agent.Apl_agentPK pk);

    /**
     * 修改或保存委托代理人
     */
    @PostMapping("/apl_agent/save")
    ResponseDTO save(@RequestBody Apl_agent  apl_agent);

    ///**
    // * 删除委托代理人 复合主键使用
    // */
    //@PostMapping("/apl_agent/deleteByPK")
    //ResponseDTO deleteByPK(@RequestBody Apl_agent.Apl_agentPK pk);
    
    /**
     * 批量删除委托代理人
     */
    @PostMapping("/apl_agent/batchDel")
    ResponseDTO batchDel(@RequestParam("ids") String ids);
    
     /**
     * 导出excel
     */
    @PostMapping("/apl_agent/output")
    void output(HttpServletResponse response, @RequestBody Apl_agentPageInfo apl_agentPageInfo);
        
     /**
     * 导出excel模板
     */
    @PostMapping("/apl_agent/exportExcelTemplate")
    void exportExcelTemplate(HttpServletResponse response);
    
     /**
     *	导入excel
     */
    @PostMapping("/apl_agent/importExcel")
    ResponseDTO importExcel(@RequestBody MultipartFile file) throws IOException ;

    /**
     * 申请人查询-按照类型分组查询
     */
    @PostMapping("/apl_agent/getAgentWithGroup")
    ResponseDTO getAgentWithGroup(@RequestParam("applyid") String applyid);

    /**
     * 申请人查询-全部查询
     */
    @PostMapping("/apl_agent/getAgentByApplyid")
    ResponseDTO getAgentByApplyid(@RequestParam("applyid") String applyid);


    /**
     * 代理人查询
     */
    @PostMapping("/apl_agent/searchByName")
    ResponseDTO searchByName(@RequestParam("name") String name);


    /**
     * 更新附件id
     * @param id 主键id
     * @param type 类型：0：身份证明 1:身份证明书，2：第三人证明材料
     * @param attachId 附件id
     * @return
     */
    @PostMapping("/apl_agent/updateAttachId")
    ResponseDTO updateAttachId(@RequestParam("id") String id, @RequestParam("type") Integer type , @RequestParam(
            "attachid") String attachId);

    /**
     * 删除附件id
     * @param id 主键id
     * @param type 类型：0：身份证明 1:身份证明书，2：第三人证明材料
     * @param attachId 附件id
     * @return
     * @return
     */
    @PostMapping("/apl_agent/deleteAttachId")
    ResponseDTO deleteAttachId(@RequestParam("id") String id, @RequestParam("type") Integer type, @RequestParam(
            "attachid") String attachId);

}
